import request from "../utils/axios";

export default {
  //登录请求
  getLoginListAPI: (params?: any) => request({
    url: '/users/login',
    method: 'POST',
    data: params,
    mock: false
  }),
  //菜单请求
  getMenuListAPI: (params?: any) => request({
    url: '/menu/list',
    method: 'GET',
    mock: false,
    data: params
  }),
  //左侧权限菜单
  getMenuPermissionList: (params?: any) => request({
    url: '/users/permissionlist',
    method: 'GET',
    data: params,
    mock: false
  }),
  //welcome echarts请求
  getEchartsListAPI: (params?: any) => request({
    url: '/echarts/list',
    method: 'GET',
    mock: false,
    data: params
  }),
  //用户请求
  getUsersListAPI: (params?: any) => request({
    url: '/users/list',
    method: 'GET',
    mock: false,
    data: params
  }),
  // 系统角色请求
  getRolesListAPI: (params?: any) => request({
    url: '/role/list',
    method: 'GET',
    mock: false,
    data: params
  }),
  // 部门请求
  getDeptListAPI: (params?: any) => request({
    url: '/dept/list',
    method: 'GET',
    mock: false,
    data: params
  }),
  //表单新增和修改
  getOperateListAPI: (params?: any) => request({
    url: '/users/operate',
    method: 'POST',
    data: params,
    mock: false
  }),
  //表单的删除
  getDeleteListAPI: (params?: any) => request({
    url: '/users/delete',
    method: 'POST',
    data: params,
    mock: false
  }),
  //表单的恢复
  getUpdateListAPI: (params?: any) => request({
    url: '/users/update',
    method: 'POST',
    data: params,
    mock: false
  }),
  //表单新增和修改
  getMenuOperateListAPI: (params?: any) => request({
    url: '/menu/operate',
    method: 'POST',
    data: params,
    mock: false
  }),
  //表单删除
  getMenuDeleteListAPI: (params?: any) => request({
    url: '/menu/delete',
    method: 'POST',
    data: params,
    mock: false
  }),
  //角色新增和修改
  getRoleOperateListAPI: (params?: any) => request({
    url: '/role/operate',
    method: 'POST',
    data: params,
    mock: false
  }),
  //角色删除
  getRoleDeleteListAPI: (params?: any) => request({
    url: '/role/delete',
    method: 'POST',
    data: params,
    mock: false
  }),
  //设置权限
  setPermissionList: (params?: any) => request({
    url: '/role/permission',
    method: 'POST',
    data: params,
    mock: false
  }),
  //部门新增和修改
  getDeptOperateListAPI: (params?: any) => request({
    url: '/dept/operate',
    method: 'POST',
    data: params,
    mock: false
  }),
  //部门删除
  getDeptDeleteListAPI: (params?: any) => request({
    url: '/dept/delete',
    method: 'POST',
    data: params,
    mock: false
  }),
  //审批列表请求
  getLeaveListAPI: (params?: any) => request({
    url: '/leave/list',
    method: 'GET',
    mock: false,
    data: params
  }),
  //审批列表创建
  getLeaveOperateListAPI: (params?: any) => request({
    url: '/leave/operate',
    method: 'POST',
    data: params,
    mock: false
  }),
  //审批休假通过/驳回
  getApproveAPI: (params?: any) => request({
    url: '/leaves/approve',
    method: 'POST',
    data: params,
    mock: false
  }),
  //验证码请求
  getCaptchaAPI:(params?: any)=>request({
    url: '/users/captcha',
    method: 'GET',
    mock: false,
    data: params
  }),
  //导出excel表格数据请求
  getExcelAPI:(params?: any)=>request({
    url: '/users/excel',
    method: 'POST',
    mock: false,
    data: params
  }),
  //导出excel表格数据请求
  uploadImg:(params?: any)=>request({
    url: '/uploads/img2',
    method: 'GET',
    mock: false,
    data: params
  })
}